import Vue from 'vue'
import Vuex from 'vuex'
import panel from './modules/panel'

Vue.use(Vuex)

export default new Vuex.Store({
  state: () => ({
    currentIndex: 0,
  }),
  mutations: {
    setCurrentIndex (state, { index }) {
      state.currentIndex = index
    },
  },
  getters: {
    getCurrentIndex(state) {
      return state.currentIndex
    },
  },
  modules: {
    panel,
  },
})